﻿<UserControl x:Class="EcoProIT.UserControles.View.DistributionView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" MinWidth="400" DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Grid>
        <ComboBox SelectedValue="{Binding Distribution}" HorizontalAlignment="Left" Margin="78,0,0,0"
                  VerticalAlignment="Top" Width="78" ItemsSource="{Binding DistributionAvailible}"
                  DisplayMemberPath="Name" />
        <ItemsControl ItemsSource="{Binding DistributionProperties}" Margin="161,0,71,0" 
                      VerticalAlignment="Top">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top"
                                Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
        <ComboBox VerticalAlignment="Top"
                  ItemsSource="{Binding Distribution.ParameterConverter.TimeConverters}"
                  SelectedValue="{Binding Distribution.ParameterConverter.UnitType, UpdateSourceTrigger=PropertyChanged}"
                  HorizontalAlignment="Right" Width="71" />
        <Label Content="Distribution" HorizontalAlignment="Left" VerticalAlignment="Top" Width="73"/>
    </Grid>
</UserControl>